package com.syedu.day03.homework;

import java.util.Scanner;

/**
 * description：
 * 键盘输入三个整数,编写三个数值的排序程序(从大到小)
 *
 * @author Administrator
 * @date 2022/3/8 16:20
 */
public class SortNumber {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请您输入三个数字: ");
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        //判断
        if (a < b) {
            //变量值互换
            int temp = a;
            a = b;
            b = temp;
        }
        if (a < c) {
            int temp = a;
            a = c;
            c = temp;
        }

        if (b < c) {
            int temp = b;
            b = c;
            c = temp;
        }
        //输出结果
        System.out.println(a + "," + b + "," + c);
    }
}